Fully customizable SwiftUI Video Player for iOS and tvOS

제품 정보

$482.25
cart 장바구니에 담기 favorites 즐겨 찾기에 추가
사용 설명서 문서 스크린샷 실시간 미리 보기 비디오

개발자

avatar
Michael wyndot
코드 샘플 요청 다이렉트 메세지

Jun 25, 2024

공개 채팅

제품 세부 정보



MPlayer - Customizable Video Player for SwiftUI



MPlayer is a cutting-edge video player designed exclusively for SwiftUI, offering unparalleled customization options for developers. Unlike traditional Apple video players like VideoPlayer and AVPlayerViewController, MPlayer empowers developers with complete control over the user interface and player functionality, enabling the creation of unique and branded video playback experiences.



Key Features:



  • Full Customization: Tailor every aspect of the video player UI to match your application's design and user experience requirements.

  • SwiftUI Integration: Seamlessly integrates into SwiftUI projects, leveraging the declarative syntax and powerful capabilities of SwiftUI.

  • Advanced Features: Supports custom control buttons, progress bars, thumbnail seeking, and interactive elements for a rich viewing experience.

  • Extensibility: Designed to be extensible, allowing developers to add new functionalities and customize existing ones to meet specific application needs.



MPlayer is the ultimate solution for developers seeking to transcend the limitations of standard video players and deliver a truly unique and engaging video playback experience within their SwiftUI applications.



Features:



  • MPlayer is specifically designed for SwiftUI and is easy to use.

  • Enjoy full customization options to create a tailored video player.

  • Supports thumbnail seeking for quick navigation.

  • Compatible with AirPlay for seamless streaming.

  • Picture-in-Picture (PiP) support for multitasking.

  • Integrates with Media Player Now Playing Info Update for enhanced control.



- MPlayer is designed specifically for SwiftUI and simple to use
- MPlayer is fully customizable
- MPlayer supports thumbnail seeking
- MPlayer supports AirPlay
- MPlayer supports PiP
- MPlayer supports Media Player Now Playing Info Update

설치 지침

1. Unzip the package to a folder accessable from your XCode project
2. In XCode, File -> Add Package Dependences
3. In the XCode Add Package Dependencies dialog, Click on `Add Local...` and select your package folder and click on `Add Package`.
4. In your code, define your `Playable` item, here is an example
struct VOD: Playable {
let url: URL
let thumbnailVideoUrl: URL?
let posterUrl: URL
let title: String
let description: String
let isVideo: Bool = true
let isLiveStream: Bool = false
var artwork: MPMediaItemArtwork?
}

extension VOD {
static var sintel: VOD {
VOD(url: URL(string: "https://media-io.s3.us-west-1.amazonaws.com/sintel/playlist.m3u8")!,
thumbnailVideoUrl: URL(string: "https://media-io.s3.us-west-1.amazonaws.com/sintel-thumbnail/sintel-thumbnail.mp4")!,
posterUrl: URL(string: "https://media-io.s3.us-west-1.amazonaws.com/Poster.jpg")!,
title: "Sintel",
description: "Sintel is an open movie from the Blender Foundation licensed under the Creative Commons Attribution 3.0 license.")
}
}
5. Then you can use the `PlayerView` anywhere in your code
PlayerView(asset: VOD.sintel,
configuration: PlayerConfiguration(controlsDismissTimeout: 10, stepInterval: 15, scrubber: .default, seekbarStyle: .default, style: .init()))
6. To customize the Player, use `PlayerConfiguration`, `PLayerStyle, `SeekBarStyle`, `ScrubberStyle` and `VolumeBarStyle`.

변경 및 적응 지침

To support thumbnail seeking, you need provide a smaller compressed video Url. Your can use ffmpeg to compress the video
ffmpeg -I 2048-stereo.mp4 -vf "scale=-1:110" -c:v libx264 -crf 28 -preset veryfast -an -movflags faststart sintel-thumbnail.mp

To customize the Player, use `PlayerConfiguration`.
struct PlayerConfiguration {
let controlsDismissTimeout: TimeInterval // in seconds
let stepInterval: Int // every step is 5 seconds, if specify 2, player will forward / backward 10 seconds every step
let scrubber: ScrubberConfiguration
let seekbarStyle: SeekBarStyle
let style: PLayerStyle
}

struct PLayerStyle {
let playImage: Image
let pauseImage: Image
let goforwardImage: Image
let gobackwardImage: Image
let optionsImage: Image
let optionCheckmarkImage: Image
let accentColor: Color
let borderColor: Color
let backgrounColor: Color
let playPauseButtonSize: CGSize
let forwardBackwordButtonSize: CGSize
let airplayButtonSize: CGSize
let pipButtonSize: CGSize
let optionsButtonSize: CGSize
let optionsMenuMinSize: CGSize
let optionsMenuCornerRadius: CGFloat
let optionsMenuBackgroundColor: Color
let optionsMenuTextColor: Color
}

public struct SeekBarStyle {
let scrubberStyle: ScrubberStyle
let thumbnailHeight: CGFloat
let timeFont: Font
}

struct ScrubberStyle {
let height: CGFloat
let padding: CGFloat
let cornerRadius: CGFloat
let backgroundColor: Color
let highlightColor: Color
let outlineWidth: CGFloat
let outlineColor: Color
}

public struct VolumeBarStyle {
let scrubberStyle: ScrubberStyle
let mutedImage: Image
let volume1Image: Image
let volume2Image: Image
let volume3Image: Image
let buttonSize: CGSize
}

가격 정보

가격 통계

최고 가격
$482.25
평균 가격
$482.25
최저 가격
$482.25
AI 가격 예측
$NA

인사이트

제한된 미리 보기


실제 제품에는 모든 파일과 전체 코드가 포함되어 있습니다.

종속성 확인

제품 외부 종속성 보기

무작위로 선택한 샘플 파일

프로젝트 파일 통계

계층구조

샘플 파일 선택
X
user-symbol

문의하기

비즈니스 개발자를 위한 최신 정보를 원하십니까? 소스 코드 프로젝트에 대한 PieceX 커뮤니티의 요구사항을 알아보세요. PieceX의 최신 무료 커뮤니티 코드를 빠르게 알려드립니다.